function [TDI] = Tdi_Calc(data)
%   TDI_CALC 时域指标计算
%   有量纲时域特征指标
    TDI.Max = max(data);                           %最大值
    TDI.Min = min(data);                           %最小值
    TDI.Peak2Valley = max(data)-min(data);         %峰峰值
    TDI.Mean = mean(data);                         %均值
    TDI.Abs = mean(abs(data));                     %绝对平均值
    TDI.Rms = rms(data);                           %均方根值
    TDI.Var = var(data,1);                         %方差
    TDI.Std = std(data,1);                         %标准差
    TDI.XFG = mean(sqrt(abs(data)))^2;             %方根幅值
%   无量纲时域特征指标
    TDI.Kurtosisfactor = kurtosis(data,1);           %峭度因子
    TDI.Skewnessfactor = skewness(data,1);           %偏度因子
    TDI.Peakfactor = TDI.Max./TDI.Rms;               %峰值因子
    TDI.Marginfactor = TDI.Max./TDI.XFG;             %裕度因子
    TDI.Skewness = TDI.Skewnessfactor.*TDI.Std.^3;   %偏度
    TDI.Kurtosis = TDI.Kurtosisfactor.*TDI.Std.^4;   %峭度
    TDI.Pulsefactor = TDI.Max./TDI.Abs;              %脉冲因子
    TDI.Wavefactor = TDI.Rms./TDI.Abs;               %波形因子

%
end

